package com.wenchao.jetpackdemo.dataBinding

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.databinding.DataBindingUtil
import com.wenchao.jetpackdemo.R
import com.wenchao.jetpackdemo.databinding.ActivityTwoWayBindingBinding

class TwoWayBindingActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val contentView = DataBindingUtil.setContentView<ActivityTwoWayBindingBinding>(
            this,
            R.layout.activity_two_way_binding
        )
        contentView.viewModel = TwoWayBindingViewModel()
    }

}